#pragma once

#ifdef _MANAGED

#using <mscorlib.dll>

using namespace System;
using namespace System::Collections;
using namespace System::Collections::Generic;
using namespace ProteinInsightInterface;

void ManagedStr2CStr(String ^ str, CString & cstr);

#endif


BOOL CompileScriptInDomain ( CString strScriptFilename, CString strDestFilename, CString strScriptTemp, CStringArray &strArrayReferences, BOOL	bDebugInfo );
HRESULT RunScriptInstantly ( CString strScriptFilename, CString strDestFilename, CStringArray &strArrayReferences, BOOL	bDebugInfo, BOOL bRun = TRUE );
HRESULT RunPlugInDLL( CString & strFilenameDLL , BOOL bExecuteNewDomain );

class CPlugIn
{
public:
	CPlugIn() { m_bRenderPlugIn = FALSE; m_ID = 0; }
	CString		m_filename;
	CString		m_strPlugInName;
	INT32			m_ID;
	BOOL		m_bRenderPlugIn;
};

typedef std::vector < CPlugIn > CSTLArrayPlugIns;

class CPlugIns
{
public:
	CPlugIns();
	virtual ~CPlugIns();

	void SetDirectory( CString strDir ){ m_strPlugInsDir = strDir; }

	void ScanDirectory(BOOL bScanDirectory);
	void ScanDirectoryRecursive(CString strPath);

	HRESULT GetPluginName( CString strFilenameDLL , CString & );

	CString				m_strPlugInsDir;
	CSTLArrayPlugIns	m_arrayPlugIns;
};


